######################################################
# SUNNY project, Anyang Normal University, IMP-CAS
#
# CMakeLists.txt for compilation of library sunny
# Author SUN Yazhou
# Created: 2020/02/02
# Last modified: 2020/10/04
######################################################

include_directories(inc)
include_directories(../cnok/inc)
aux_source_directory(src LIB_SRCS)
set(target sunny)

# add config.h to allow cmake to configure the source code
configure_file(
  "${PROJECT_SOURCE_DIR}/cmake/scripts/config.h.in"
  "${PROJECT_SOURCE_DIR}/fci/inc/config.h"
)

add_library(${target} SHARED ${LIB_SRCS})
target_link_libraries(${target} yaml-cpp)
if(ROOT_FOUND)
  target_link_libraries(${target} ${ROOT_LIBRARIES})
endif()
if(OpenCV_FOUND)
  target_link_libraries(${target} ${OpenCV_LIBRARIES})
endif()
